﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NewDDSys.Entity;
using NewDDSys.Factory;
using NewDDSys.IBLL;
using System.Data;

namespace NewDDSys.BLL
{
    public class HweekplanBLL:IHweekplanBLL
    {
        public int AddHweekplan(HweekplanInfo hwp)
        {
            return DALFactory.CreateHweekplanDAL().AddHweekplan(hwp);
        }
        public int UpdateHweekplan(string num, string ku, string sday, string eday, decimal wcl, decimal jk)
        {
            return DALFactory.CreateHweekplanDAL().UpdateHweekplan(num, ku, sday, eday, wcl, jk);
        }
        public int UpdateHweekplanJK(string num, decimal jk)
        {
            return DALFactory.CreateHweekplanDAL().UpdateHweekplanJK(num, jk);
        }

        public int Del(string num)
        {
            return DALFactory.CreateHweekplanDAL().Del(num);
        }
        public DataSet Select(string num)
        {
            return DALFactory.CreateHweekplanDAL().Select(num);
        }
        public DataSet SelectByDay(string sday)
        {
            return DALFactory.CreateHweekplanDAL().SelectByDay(sday);
        }
        public string AUTOID()
        {
            return DALFactory.CreateHweekplanDAL().AUTOID();
        }
        public string jhcs(string ku, string xdbumen, string cday)
        {
            
            string cs = "";
            if (xdbumen == "运输处")
                cs = DALFactory.CreateYsjhDAL().ysr(cday, ku);
            else
                cs = DALFactory.CreateHweekplanDAL().zzhr(cday, ku);
            return cs;
        }
    }
}
